function saveSequences(filename, seqs)

fid = fopen(filename, 'w');

nseqs = numel(seqs);
% fprintf(fid, '%d\n', nseqs);

for i = 1:length(seqs)
%     fprintf(fid, '%d\n', length(seqs{i}));
    for j = 1:length(seqs{i})
        fprintf(fid, '%s ', seqs{i}{j});
    end
    fprintf(fid, '\n');
end

fclose(fid);
